    import { getSubCategory, getCategoryFilter } from '@/network/category';
    import {ref, onMounted} from 'vue'
    import {useRoute} from 'vue-router'

export function useCategorySub(){
    // 面包屑数据
    const categoryData = ref({})
    const route = useRoute()
    const getCategoryData = async () => {
       const res = await getSubCategory(route.params.id)
    //    console.log(res);
       categoryData.value = res.result
    }

    onMounted(() => {
        getCategoryData()
    })

    return {categoryData}
}